package huizhi.miniotest;

import io.minio.MinioClient;
import io.minio.UploadObjectArgs;

public class ExerciseDemo1 {
    public static void main(String[] args) throws Exception {
        MinioClient minioClient =
                MinioClient.builder()
                        .endpoint("http://192.168.155.112:13152")
                        .credentials("minioadmin", "minioadmin")
                        .build();
        minioClient.uploadObject(
                UploadObjectArgs.builder()
                        .bucket("test1")
                        .object("克隆.txt")
                        .filename("C:\\Users\\Administrator\\Desktop\\克隆.txt")
                        .build());
        System.out.println(
                "'/home/user/Photos/asiaphotos.zip' is successfully uploaded as "
                        + "object 'asiaphotos-2015.zip' to bucket 'asiatrip'.");

    }

}
